<gm:page title="Demo - geolocationref attribute" authenticate="false">
  
  <div class="gm-app-header">
    <h2>Geoencoding and plotting addresses using 'geolocationref' attribute<h2>
  </div>  
  
  <table width="100%">
    <tr>
      <td width="265" valign="top">
        <gm:list id="myList" data="${myData}" template="myListTemplate">
          <gm:handleEvent event="select" src="myMap"/>
        </gm:list>
      </td>
      <td width="10">
      </td>
      <td valign="top">
        <gm:map id="myMap" style="border:solid black 1px" height="520" data="${myData}" geolocationref="gmd:location" infotemplate="myMapDetailsTemplate">
          <gm:handleEvent event="select" src="myList"/>
        </gm:map>
      </td>
    </tr>
  </table>
  
  <gm:template id="myListTemplate">
    <table class="gray-theme">
      <thead>
        <tr>
          <td colspan="2">Google U.S. offices</td>
        </tr>
      </thead>
      <tr repeat="true">
        <td><gm:text ref="atom:title"/></td>
      </tr>
    </table>
  </gm:template>
  
  <gm:template id="myMapDetailsTemplate">
    <h2><gm:text ref="atom:title"/></h2>
    <gm:text ref="gmd:location"/>
  </gm:template>

  <gm:data id="myData">
    <atom:feed>
      <atom:entry>
        <atom:id>1</atom:id>
        <atom:title>Headquarters</atom:title>
        <gmd:location>1600 Amphitheatre Parkway, Mountain View, CA</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>2</atom:id>
        <atom:title>New York Sales and Engineering Office</atom:title>
        <gmd:location>76 Ninth Avenue, New York, NY</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>3</atom:id>
        <atom:title>Ann Arbor Sales Office</atom:title>
        <gmd:location>201 South Division Street, Ann Arbor, MI</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>4</atom:id>
        <atom:title>Atlanta Sales and Engineering Office</atom:title>
        <gmd:location>10 10th Street, Atlanta, GA</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>5</atom:id>
        <atom:title>Boulder Sales and Engineering Office</atom:title>
        <gmd:location>1433 Pearl Street, Boulder, CO</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>6</atom:id>
        <atom:title>Cambridge Sales and Engineering Office</atom:title>
        <gmd:location>One Broadway, Cambridge, MA</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>7</atom:id>
        <atom:title>Chicago Sales and Engineering Office</atom:title>
        <gmd:location>20 West Kinzie Street, Chicago, IL</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>8</atom:id>
        <atom:title>Coppell Sales and Engineering Office</atom:title>
        <gmd:location>701 Canyon Drive, Coppell, TX</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>9</atom:id>
        <atom:title>Dallas Sales Office</atom:title>
        <gmd:location>5430 LBJ Freeway, Dallas TX</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>10</atom:id>
        <atom:title>Denver Sales Office</atom:title>
        <gmd:location>4600 S. Syracuse Street, Denver, CO</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>11</atom:id>
        <atom:title>Detroit Sales Office</atom:title>
        <gmd:location>2000 Town Center, Southfield, MI</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>12</atom:id>
        <atom:title>Irvine Sales and Engineering Office</atom:title>
        <gmd:location>19540 Jamboree Road, Irvine, CA</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>13</atom:id>
        <atom:title>Phoenix Sales and Engineering Office</atom:title>
        <gmd:location>1551 S. Rural Road, Tempe, AZ</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>14</atom:id>
        <atom:title>Pittsburgh Engineering Office</atom:title>
        <gmd:location>4720 Forbes Avenue, Pittsburgh, PA</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>15</atom:id>
        <atom:title>Santa Monica Sales and Engineering Office</atom:title>
        <gmd:location>604 Arizona Avenue, Santa Monica, CA</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>16</atom:id>
        <atom:title>Seattle Engineering Office</atom:title>
        <gmd:location>720 4th Avenue, Kirkland, WA</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>17</atom:id>
        <atom:title>Seattle Sales Office</atom:title>
        <gmd:location>501 N. 34th Street, Seattle, WA</gmd:location>
      </atom:entry>
      <atom:entry>
        <atom:id>18</atom:id>
        <atom:title>Washington, D.C. Public Policy Office</atom:title>
        <gmd:location>1001 Pennsylvania Avenue, Washington, DC</gmd:location>
      </atom:entry>
    </atom:feed>
  </gm:data>

</gm:page>